package com.example.mntz.dao;

import com.example.mntz.model.Cm;
import com.example.mntz.model.Post;
import com.example.mntz.model.PostBq;
import com.example.mntz.model.PostExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface PostMapper {
    long countByExample(PostExample example);

    int deleteByExample(PostExample example);

    int deleteByPrimaryKey(Integer postid);

    int insert(Post record);

    int insertSelective(Post record);

    List<Post> selectByExampleWithBLOBs(PostExample example);

    List<Post> selectByExample(PostExample example);

    Post selectByPrimaryKey(Integer postid);

    int updateByExampleSelective(@Param("record") Post record, @Param("example") PostExample example);

    int updateByExampleWithBLOBs(@Param("record") Post record, @Param("example") PostExample example);

    int updateByExample(@Param("record") Post record, @Param("example") PostExample example);

    int updateByPrimaryKeySelective(Post record);

    int updateByPrimaryKeyWithBLOBs(Post record);

    int updateByPrimaryKey(Post record);

    List<PostBq> selectbq(PostBq bq);

    List<Post> selectposts(@Param("title")String title, @Param("bqs")String[] bqs,@Param("uid")Integer uid,@Param("postStatu")Integer postStatu,@Param("username")String username);

    Integer selectpostscount(@Param("title")String title,  @Param("bqs")String[] bqss, @Param("uid")Integer uid, @Param("postStatu")Integer postStatu);

    List<Cm> selectPostCm(int postid);

    void addBrowses(int postid);

    void insterPostcm(Cm cm);

    int selectcountcm(@Param("postId") Integer postId, @Param("userId")Integer userId);

    void insterPostDz(@Param("postId") Integer postId, @Param("userId")Integer userId);

    void deletePostDz(@Param("postId") Integer postId, @Param("userId")Integer userId);

    void insterPost(Post post);

    void updatePost(Post post);
}